// @author: DejaVu

void npc(Player @player, NPC @npc) {
    int state = npc.getState();
    int selection = npc.getSelected();
	int room;
	if(state == 0){
        npc.addText("Welcome to the Sauna Hotel.");
        npc.sendNext();
    }
    else if(state == 1){
        npc.addText("Which Sauna do you wish to go?\r\n#L0#Regular Sauna#l\r\n#L1#VIP Sauna#l");
        npc.sendSimple();
    }
    else if(state == 2){
		npc.setVariable("selection", selection);
        if(selection == 0){
            npc.addText("Do you want to go to the #bRegular Sauna#k?");
            npc.sendYesNo();
        }
        else if(selection == 1){
            npc.addText("Do you want to go to the #bVIP Sauna#k?");
            npc.sendYesNo();
        } else {
			npc.end();
		}
    }
    if(state == 3) {
		if(npc.getSelected() == YES){
			selection = npc.getVariable("selection");
			if (selection == 0){
				if (player.getMesos() >= 499) {
					player.giveMesos(-499);
					player.changeMap(105040401);
					npc.end();
				} else {
					npc.addText("You need #b500 mesos#k to use the Sauna.");
					npc.sendOK();
					npc.end();
				}
			} 
			else if(selection == 1){
				if (player.getMesos() >= 999) {
					player.giveMesos(-999);
					player.changeMap(105040402);
					npc.end();
				} else {
					npc.addText("You need #b1000 mesos#k to use the Sauna.");
					npc.sendOK();
					npc.end();
				}
			}else{
				npc.addText("Come back when your ready to use the Sauna!");
				npc.sendOK();
				npc.end();
			}
		} else {
			npc.addText("Come back when your ready to use the Sauna!");
			npc.sendOK();
			npc.end();
		}
	} else {
		npc.addText("Come back when your ready to use the Sauna!");
		npc.sendOK();
		npc.end();
	}
}